﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Diagnostics;
using System.Runtime.InteropServices;

namespace FormatTest
{
    class Program
    {
        static void Main(string[] args)
        {
            //将H.264格式转化为MPEG2-TS格式
            //读取出文件
            //using (FileStream fileStream = File.Open("E:\\H264视频\\test.h264", FileMode.Open))
            //{
            //    var bytes = new byte[200];
            //    fileStream.Read(bytes, 0, 200);
            //}
            //public void 
            //Process p = new Process();
            //p.StartInfo.FileName = @"E:\test\FormatTest\FormatTest\bin\Debug\ffmpeg.exe";
            //p.StartInfo.Arguments = @"-y -i E:\H264\test.h264 -f mpegts E:\vcd.mpg";
            //p.StartInfo.UseShellExecute = false;
            //p.StartInfo.RedirectStandardError = true;
            //p.StartInfo.CreateNoWindow = false;
            //p.ErrorDataReceived += p_ErrorDataReceived;
            //p.Start();
            ////p.BeginErrorReadLine();
            //p.WaitForExit();
            //p.Close();
            //p.Dispose();
        }

        static void p_ErrorDataReceived(object sender, DataReceivedEventArgs e)
        {
            throw new NotImplementedException();
        }


    }
}
